function validate_78(){
oHobbies = document.getElementsByName('hobbies[]');
var minCheck = 2;
var count = 0;
  for(var i=0 ; i<oHobbies.length ; i++) {
    if(oHobbies[i].checked == true){
      count++;
    }
  }
  if(count < minCheck) {
    alert("Please check atleast "+minCheck+" hobbies");
    return false;
  }
}

function validate_456(){
oHobbies = document.getElementsByName('hobbies[]');
// number of checkbox
//alert(oHobbies.length);
  for(var i=0 ; i<oHobbies.length ; i++) {
    alert(oHobbies[i].checked);
  }
}

function validate(obj){
  oUname = obj.uname;
  oCountry = obj.country;

  oHiddenGender = document.getElementById('hiddenGenderId');

  if(oUname.value == '') {
    alert("Name should not be blank");
    oUname.focus();
    return false;
  } else if(oUname.value.length < 8) {
    alert("Name should not be less then 8 char");
    oUname.focus();
    oUname.select();
    return false;
  } else if(oHiddenGender.value=="") {
    alert("Please check any gender");
    return false;
  }if(oCountry.value == '') {
    alert("Please select country");
    oUname.focus();
    return false;
  }
  return true;
}
